﻿#light

open FsStoryRunnerMonadic
open Xunit
open MonadicTurtleMovesImpl
open Common.Monads.State    //Only needed if endStoryWith is used.

(*
In order to have fun
 As a consumer of the turtle API
 I want to be able to move the turtle
*)

[<Fact>]
let MoveTurtle() = 
       given ATurtle
    |> whens MovesOneStepForward
    |> thens IsMovedOneStepForward
    |> andThens (RotationIs 0)
    |> endStory ()
    

[<Fact>]
let MoveTurtleToPosition() = 
       given ATurtle
    |> andGiven IsRotated90DegreesToTheRight
    |> whens (TurtleWalksSteps 9)
    |> thens (TurtleIsLocatedAt (9,0))   
    |> endStoryWith Exec
